#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	string s;
	cin >> s;
	for (int i = 0; i < s.size() - 1; i++) {
		if (isdigit(s[i + 1])) {
			string t;
			for (int j = 1; j <= s[i + 1] - '0'; j++)
				t += s[i];
			s.replace(i, 2, t);
		}
	}
	cout << s;
	return 0;
}
